package jTorrent;

import java.awt.Polygon;

public class Symbol
{
	private String identifier;
	public static Symbol PLAY = new Symbol("Play");
	public static Symbol PAUSED = new Symbol("Paused");
	public static Symbol EDIT = new Symbol("Edit");
	
	public Symbol(String identifier)
	{
		this.identifier = identifier;
	}
	
	public Polygon[] getPolygon()
	{
		Polygon polygon[] = null;
		Polygon tempPolygon = null;
		switch(identifier)
		{
		case "Play":
			tempPolygon = new Polygon();
			tempPolygon.npoints = 3;
			tempPolygon.xpoints = new int[] {4, 14, 4}; 
			tempPolygon.ypoints = new int[] {3, 8, 13};
			polygon = new Polygon[] {tempPolygon};
			break;
			
		case "Paused":
			tempPolygon = new Polygon();
			tempPolygon.npoints = 4;
			tempPolygon.xpoints = new int[] {3, 7, 7, 3}; 
			tempPolygon.ypoints = new int[] {2, 2, 14, 14};
			
			polygon = new Polygon[2];
			polygon[0] = tempPolygon;
			
			tempPolygon = new Polygon();
			tempPolygon.npoints = 4;
			tempPolygon.xpoints = new int[] {9, 13, 13, 9}; 
			tempPolygon.ypoints = new int[] {14, 14, 2, 2};
			
			polygon[1] = tempPolygon;
			break;
			
		case "Edit":
			tempPolygon = new Polygon();
			tempPolygon.npoints = 5;
			tempPolygon.xpoints = new int[] {4, 4, 9, 12, 7}; 
			tempPolygon.ypoints = new int[] {12, 9, 4, 7, 12};
			polygon = new Polygon[] {tempPolygon};
			break;
		}
		
		return polygon;
	}
}
